package com.mysoft.gfyx.clue.mip;

import com.mingyuanyun.sdk.mip.annotation.MipAuth;
import com.mingyuanyun.sdk.mip.client.IHttpApi;
import com.mingyuanyun.sdk.mip.enm.MipAuthType;
import com.mysoft.gfyx.clue.mip.dto.EsBasePagerRespondDto;
import com.mysoft.gfyx.clue.mip.dto.OpptySubsSearchRequestDto;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

import java.util.LinkedHashMap;

@MipAuth(MipAuthType.OAUTH2)
public interface OpptySubsSearchService extends IHttpApi {
    // todo 对接数据服务高级筛选
    @RequestLine("POST /v1/company/fuzzy-search")
    @Headers("Content-Type: application/json")
    LinkedHashMap opptySubsSearch(OpptySubsSearchRequestDto fuzzySearchReqDto);

    @RequestLine("GET /opensearch/oppotunity/subscription?keyword={keyword}&area={area}&source={source}&created_time={created_time}&company_type={company_type}&purchase_amount_lower={purchase_amount_lower}&purchase_amount_upper={purchase_amount_upper}&contact_type={contact_type}&page={page}&page_size={pageSize}")
    @Headers("Content-Type: application/json")
    EsBasePagerRespondDto pullSubscription(@Param("keyword") String keyword, @Param("area") String area, @Param("source") String city, @Param("created_time") String created_time, @Param("company_type") String company_type, @Param("purchase_amount_lower") String purchase_amount_lower, @Param("purchase_amount_upper") String purchase_amount_upper, @Param("contact_type") String contact_type, @Param("page") int page, @Param("pageSize") int pageSize);

    @RequestLine("GET /opensearch/project-lifecycle/subscription?area={area}&land_type={land_type}&take_land_price_lower={take_land_price_lower}&take_land_price_upper={take_land_price_upper}&is_high_level_project={is_high_level_project}&work_start_date={work_start_date}&take_land_date={take_land_date}&page={page}&page_size={pageSize}")
    @Headers("Content-Type: application/json")
    EsBasePagerRespondDto pullProjectSubscription(@Param("area") String area, @Param("land_type") String land_type, @Param("take_land_price_lower") String take_land_price_lower, @Param("take_land_price_upper") String take_land_price_upper, @Param("is_high_level_project") String is_high_level_project, @Param("work_start_date") String work_start_date, @Param("take_land_date") String take_land_date, @Param("page") int page, @Param("pageSize") int pageSize);
}